package com.googlecode.jmicroerp.model;

import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author alex
 */
@Entity
@Table(name = "magazine")
public class Magazin extends AbstractEntitate {
    private String denumire;
    private String adresa;
    private List<Recipient> recipiente;
    private List<ProgramLucru> programLucru;

    @Column(name = "denumire", length = 127)
    public String getDenumire() {
        return denumire;
    }

    public void setDenumire(String denumire) {
        this.denumire = denumire;
    }

    @Column(name = "adresa", length = 255)
    public String getAdresa() {
        return adresa;
    }

    public void setAdresa(String adresa) {
        this.adresa = adresa;
    }

    @OneToMany(fetch = FetchType.LAZY, mappedBy = "magazin")
    public List<Recipient> getRecipiente() {
        return recipiente;
    }

    public void setRecipiente(List<Recipient> recipiente) {
        this.recipiente = recipiente;
    }

    @OneToMany(fetch = FetchType.LAZY, mappedBy = "magazin")
    public List<ProgramLucru> getProgramLucru() {
        return programLucru;
    }

    public void setProgramLucru(List<ProgramLucru> programLucru) {
        this.programLucru = programLucru;
    }
}
